<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>充值记录</title>
        <link href="/zhenze/Public/admin/css/style.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="/zhenze/Public/admin/js/jquery.js"></script>
        <script type="text/javascript" src="/zhenze/Public/My97DatePicker/WdatePicker.js"></script>  
    </head>

    <body>

        <div class="place">
            <span>位置：</span>
            <ul class="placeul">
                <li><a href="<?php echo U('index/welcome');?>">首页</a></li>
                <li><a href="###">充值记录</a></li>
            </ul>
        </div>

        <div class="formbody"> 
            <form name="seachform" id="seachform" action="<?php echo U('user/topup');?>" method="post">
                <ul class="seachform">
                    <li><label>手机号</label><input style='width:80px;' name="mobile"  value="<?=I('mobile')?>" type="text" class="scinput" /></li>		
                    <li><label>类别</label>
                        <select id="type" name="type" class="scinput" style='width:80px;'>
                            <option value="">-选择-</option> 
                            <?php foreach(D('Topup')->type AS $k=>$v):?>
                            <option value="<?php echo ($k); ?>" <?php if(I('type')==$k):?>selected<?php endif;?>/><?= $v?></option> 
                            <?php endforeach;?>
                        </select>  
                    </li>
					<li><label>状态</label>
                        <select id="status" name="status" class="scinput" style='width:80px;'>
                            <option value="">-选择-</option> 
                            <option value="1" <?php if($status==1):?>selected<?php endif;?>/>未处理</option> 
							<option value="2" <?php if($status==2):?>selected<?php endif;?>/>已处理</option> 
                        </select>  
                    </li>
                    <li><label>用户名</label><input style='width:80px;' name="nickname"  value="<?=I('nickname')?>" type="text" class="scinput" /></li>		
                    <li><label></label><input placeholder="起始时间" name="start_time" id="starttime" class="scinput" type="text" onfocus="WdatePicker({dateFmt: 'yyyy-MM-dd'})" datatype="*" errormsg="时间范围开始值不能为空！" maxlength="20" style="width: 150px;" readonly value="<?=I('start_time')?>" /></li>
                    <li><label></label><input placeholder="截止时间" name="end_time" id="endtime" class="scinput" type="text" onfocus="WdatePicker({dateFmt: 'yyyy-MM-dd'})" datatype="*" errormsg="时间范围结束值范围不能为空！" maxlength="20" style="width: 150px;" readonly value="<?=I('end_time')?>" /></li>
                    <li><label>&nbsp;</label><input name="" type="submit" class="scbtn" value="查询"/></li>
                </ul>
            </form>

            <table class="tablelist">
                <thead>
                    <tr> 
                        <th>充值用户</th>
						<th>手机号</th>
                        <th>类别</th>
						<th>状态</th>
                        <th>充值花费</th>
						<th>充值备注</th>
                        <th>时间</th>  
						<th>操作</th>  
                    </tr>
                </thead>
                <tbody>
                    <?php if(is_array($dataList)): $i = 0; $__LIST__ = $dataList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$value): $mod = ($i % 2 );++$i;?><tr> 
							<td><?= $value['nickname']?></td>
                            <td><?= $value['mobile']?></td>
                            <td><?= D('Topup')->type[$value['type']]?></td>   
							<td>
							<?php if($value['status']==1){?>未处理<?php }elseif($value['status']==2){?>已处理<?php }?>
							</td> 
                            <td><?= $value['amount']?></td>  
                            <td><?= $value['remark']?></td> 
                            <td><?= date('Y-m-d H:i:s',$value['time'])?></td>   
							<td>
								<?php if($value['status']==1):?><a href="<?php echo U('user/topupstatus',array('id'=>$value['id']));?>" onclick="{if(confirm('确认处理?')){return true;}return false;}" class="tablelink">处理</a><?php endif;?>
							</td>   
                        </tr><?php endforeach; endif; else: echo "" ;endif; ?>
                </tbody>
            </table>

            <?php echo ($pageshow); ?>

        </div>
        <script type="text/javascript">
            $('.tablelist tbody tr:odd').addClass('odd');
        </script>
    </body>

</html>